module.exports = {
  apps : [{
    name: 'ex-3002',
    script: './dist/app.js',
    watch: './dist',
    env: {
      NODE_ENV: 'development',
    },
    env_production: {
      NODE_ENV: 'production'
    }
  }],

  deploy : {
    production : {
      user : 'root',
      host : 'ssh_ip',
      ref  : 'origin/deploy',
      repo : 'https://gitee.com/lauset/uni-expresss.git',
      path : '/www/wwwroot/pm2s/ex-3002',
      'pre-deploy': 'git fetch --all',
      'pre-deploy-local': '',
      'post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env production',
      'pre-setup': '',
      env: {
        NODE_ENV: 'production'
      }
    }
  }
}
